#__author__ = 'xuhongling'
#coding: utf-8

from selenium import webdriver
import time
browser = webdriver.Firefox()
browser.get("https://www.hao123.com/")
time.sleep( 3 )

#data = browser.find_element_by_tag_name("select").text
#print "data is :"+data
#time.sleep( 3 )

select = browser.find_element_by_tag_name("select")
#select_province = select.find_element_by_class_name("select select-province province-hook")
select_province1 = select.find_element_by_class_name("self","select select-province province-hook")
alloptions = select_province1.find_element_by_tag_name("option")
for option in alloptions:
    print "value is:"+ option.get_attribute("value")
    option.click()



